<!DOCTYPE HTML>
<html>
<head>
<script id="allmobilize" charset="utf-8" src="style/js/allmobilize.min.js"></script>
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="alternate" media="handheld"  />
<!-- end 云适配 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>登录-牛币网-最专业的互联网招聘平台</title>
<meta property="qc:admins" content="23635710066417756375" />
<meta content="牛币网是3W旗下的互联网领域垂直招聘网站,互联网职业机会尽在牛币网" name="description">
<meta content="牛币,牛币网,牛币招聘,牛币, 牛币网 ,互联网招聘,牛币互联网招聘, 移动互联网招聘, 垂直互联网招聘, 微信招聘, 微博招聘, 牛币官网, 牛币百科,跳槽, 高薪职位, 互联网圈子, IT招聘, 职场招聘, 猎头招聘,O2O招聘, LBS招聘, 社交招聘, 校园招聘, 校招,社会招聘,社招" name="keywords">

<meta name="baidu-site-verification" content="QIQ6KC1oZ6" />

<!-- <div class="web_root"  style="display:none">h</div> -->
<script type="text/javascript">
var ctx = "h";
console.log(1);
</script>
<link rel="Shortcut Icon" href="h/images/favicon.ico">
<link rel="stylesheet" type="text/css" href="style/css/style.css"/>

<script src="style/js/jquery.1.10.1.min.js" type="text/javascript"></script>

<script type="text/javascript" src="style/js/jquery.lib.min.js"></script>
<script type="text/javascript" src="style/js/core.min.js"></script>


<script type="text/javascript">
var youdao_conv_id = 271546; 
</script> 
<script type="text/javascript" src="style/js/conv.js"></script>

<style>
	
	#v_container{
		
	}
	
</style>


</head>

<body id="login_bg">
	<div class="login_wrapper">
		<div class="login_header">
        	<a href="h/"><img src="style/images/logo_white.png" width="285" height="62" alt="牛币招聘" /></a>
            <div id="cloud_s"><img src="style/images/cloud_s.png" width="81" height="52" alt="cloud" /></div>
            <div id="cloud_m"><img src="style/images/cloud_m.png" width="136" height="95"  alt="cloud" /></div>
        </div>
        
    	<input type="hidden" id="resubmitToken" value="" />		
		 <div class="login_box">
        	<form id="loginForm">
				<input type="text" id="email" name="email" value="" tabindex="1" placeholder="请输入登录邮箱地址" />
				<span id="emailError" class="error"></span>
			  	<input type="password" id="password" name="password" tabindex="2" placeholder="请输入密码" />
				<span class="error" style="display:none;" id="beError"></span>
				<span id="passwordError" class="error"></span>
				<div style="display: inline-block" id = "tt" name="tt">
					<input type="text" id="verifycode" name="verifycode" style="width:100px;font-size:16px; color:#777; border:none;" placeholder="请输入验证码" /><div id="v_container" style="height: 40px;width: 150px;position: relative;margin-left: 5px;margin-left: 130px;margin-top: -65px;"></div>
					<a href="#" style="width: 80px;background-color: #0D9572;border: none;text-align: center;color: white;font-size:16px;position: relative;margin-left: 295px;" id = "btn">换一张</a>
				</div>
				<input type="hidden" id="currentVerifyCodeState" name="currentVerifyCodeState" value=""/>
				<span id="verifyCodeError" class="error"></span>
			    <label class="fl" for="remember"><input type="checkbox" id="remember" value="" checked="checked" name="autoLogin" /> 记住我</label>
			    <a href="reset.html" class="fr">忘记密码？</a>
				<button  id="submitLogin">登 &nbsp; &nbsp; 录</button>
				<a href="register.html" class="fr" target="_blank" style="display: block;height: 60px;line-height: 60px;">去注册</a>
				
				<!--<a style="color:#fff;" href="index.html" class="submitLogin" title="登 &nbsp; &nbsp; 录"/>登 &nbsp; &nbsp; 录</a>-->

			    
			    <input type="hidden" id="callback" name="callback" value=""/>
                <input type="hidden" id="authType" name="authType" value=""/>
                <input type="hidden" id="signature" name="signature" value=""/>
                <input type="hidden" id="timestamp" name="timestamp" value=""/>
				
			</form>
			
        </div>
        <div class="login_box_btm"></div>
    </div>
<script src="style/js/myajax.js" type="text/javascript"></script>
<script src="style/js/gVerify.js" type="text/javascript"></script>
	


</body>
<script type="text/javascript">
	var data
	
	var url = decodeURI(window.location.href.split("?")[1]);
	
	
	//var projectId = url.split("id=")[1].split("&")[0];
	var html = url.split("html=")[1];
	var param
	if(html != undefined){
		var index = html.indexOf("&")
		console.log("index:"+index)
		if(index != -1){
			param = html.substring(index+1)
			html = html.substring(0,index)
			console.log("param为："+param)
		}
		console.log("html页面为：" + html)
	}
	
	$.ajax({ 
	    type:'post',  
	    url:path+"verifyCode", 
	    async: false,
	    data:{},  //重点必须为一个变量如：data
	    dataType:'json', 
		crossDomain: true,
		xhrFields: {
			withCredentials: true
		},
	    success:function(data){    
			//alert(da.msg+"data数据")
			var verifyCode = new GVerify("v_container",data.verifycode);			
	    },
	    error:function(){ 
	     alert("请求失败")
	    }
	   })
		
	//验证表单
	 	$("#loginForm").validate({
	 		/* onkeyup: false,
	    	focusCleanup:true, */
	        rules: {
	    	   	email: {
	    	    	required: true,
	    	    	email: true
	    	   	},
	    	   	password: {
	    	    	required: true
	    	   	},
				currentVerifyCodeState: {
					required: true
				}
	    	},
	    	messages: {
	    	   	email: {
	    	    	required: "请输入登录邮箱地址",
	    	    	email: "请输入有效的邮箱地址，如：vivi@163.com"
	    	   	},
	    	   	password: {
	    	    	required: "请输入密码"
	    	   	},
				currentVerifyCodeState: {
					required: "请输入验证码"
				}
	    	},
	    	submitHandler:function(form){
	    		if($('#remember').prop("checked")){
	      			$('#remember').val(1);
	      		}else{
	      			$('#remember').val(null);
	      		}
	    		var email = $('#email').val();
	    		var password = $('#password').val();
	    		var remember = $('#remember').val();
			
	    		var callback = $('#callback').val();
	    		var authType = $('#authType').val();
	    		var signature = $('#signature').val();
	    		var timestamp = $('#timestamp').val();
				var data = ajaxPost("#loginForm",'/user/login')
				if(data.emailError != undefined){
					$('#emailError').html(data.emailError).css("display","block")
					$('#passwordError').css("display","none")
					$('#verifyCodeError').css("display","none")
				}
				if(data.passwordError != undefined){
					//alert(data.passwordError)
					$('#passwordError').html(data.passwordError).css("display","block")
					$('#emailError').css("display","none")
					$('#verifyCodeError').css("display","none")
				}
				if(data.verifyCodeError != undefined){
					$('#verifyCodeError').html(data.verifyCodeError).css("display","block")
					$('#emailError').css("display","none")
					$('#passwordError').css("display","none")
				}
				if(data.successLocation != undefined){
					if(html != undefined){
						if(param != undefined){
							window.location.href= html+"?"+param
						}else{
							window.location.href= html
						}
						
					}else{
						
						
						
						window.location.href=  data.successLocation
					}
					
				}
// 				$.ajax({ 
// 				    type:'post',  
// 				    url:path()+"verifyCode", 
// 				    async: false,
// 				    data:{},  //重点必须为一个变量如：data
// 				    dataType:'json', 
// 					crossDomain: true,
// 					xhrFields: {
// 						withCredentials: true
// 					},
// 				    success:function(data){    
// 						//alert(da.msg+"data数据")
// 						var verifyCode = new GVerify("v_container",data.verifycode);			
// 				    },
// 				    error:function(){ 
// 				     alert("请求失败")
// 				    }
// 				   })
	        }

});
	
	
	$("#verifycode").on('blur',function(){
		//alert("失去焦点")
		//console.log("失去焦点")
		
		$("#currentVerifyCodeState").val($("#verifycode").val()) 
		
	})
		
	//单击实现验证码换一张
	$('#btn').on('click',function(){ 
		//alert("key")
		
		$.ajax({ 
		    type:'post',  
		    url:path+"verifyCode", 
		    async: false,
		    data:{},  //重点必须为一个变量如：data
		    dataType:'json', 
			crossDomain: true,
			xhrFields: {
				withCredentials: true
			},
		    success:function(data){    
				//alert(da.msg+"data数据")
				var verifyCode = new GVerify("v_container",data.verifycode);			
		    },
		    error:function(){ 
		     alert("请求失败")
		    }
		   })
	});






</script>
</html>